<template>
  <div class="online-count-area d-flex ai-c">
    <div class="f-14">
      <span>当前在线人数：</span>
      <span>{{ count }}</span>
    </div>
    <div class="f-14">
      <span>日访问量：</span>
      <span>{{ dayCount }}</span>
    </div>
    <div class="f-14">
      <span>总访问量：</span>
      <span>{{ totalCount }}</span>
    </div>
  </div>
</template>

<script>
import request from '@/utils/request'

export default {
  name: 'OnlineCount',
  data () {
    return {
      count: 0,
      dayCount: 0,
      totalCount: 0
    }
  },
  created () {
    request.get('/ysjc/user/onlineCount').then((data) => {
      this.count = data.onlineCount
      this.dayCount = data.jrnum
      this.totalCount = data.znum
    })
  }
}
</script>

<style lang="scss" scoped>
.online-count-area {
  color: #e5edfd;
  margin: 0 20px;
  gap: 8px;
}
</style>
